﻿<!DOCTYPE html >
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>角色管理</title>
		<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"></link>
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/bootstrap.min.js"></script>
		<link rel="stylesheet"
			href="../../css/table.css" type="text/css"/>
		<script type="text/javascript">
			function doDelete(role_Id) {
				if (window.confirm("确定删除此角色吗？")) {
					location.href ="role_delete?role_Id=" + role_Id;
				}
			}
		</script>
	</head>
	<body>
		<table width="100%">
			<tr>
				<td>
					<font color="black">您正在做的业务是：人力资源--权限管理--角色管理 </font>
				</td>
			</tr>
			<tr>
				<td>
					当前角色总数：例
				</td>
			</tr>
			<tr>
				<td align="right">
					<input type="button" value="添加角色" class="BUTTON_STYLE1" onclick="location.href='right_add'">
				</td>
			</tr>
		</table>
		<table width="100%" border="1" cellpadding=5 cellspacing=1
			bordercolorlight=#848284 bordercolordark=#eeeeee
			class="TABLE_STYLE1">
			<tr class="TR_STYLE1">
				<td class="TD_STYLE1">
					角色编号
				</td>
				<td class="TD_STYLE1">
					角色名称
				</td>
				<td class="TD_STYLE1">
					角色说明
				</td>
				<td class="TD_STYLE1">
					是否可用
				</td>
				<td class="TD_STYLE1">
					操作
				</td>
			</tr>
			
				<tr class="TR_STYLE2" th:each="r:${items}">
					<td class="TD_STYLE2" th:text="*{r.role_Id}">

					</td>
					<td class="TD_STYLE2" th:text="*{r.role_Name}">

					</td>
					<td class="TD_STYLE2" th:text="*{r.role_Desc}">
						
					</td>
					<td class="TD_STYLE2" th:text="*{r.role_Flag==2?'禁用':'正常'}">

					</td>
					<td class="TD_STYLE2">
					<a th:href="|role_update1?role_Id=${r.role_Id}|"><img src="../../images/bt_edit.gif" title="编辑" style="cursor:pointer;"></a>
						 <img src="../../images/bt_del.gif"  title="删除" style="cursor:pointer;"  th:onclick="|doDelete(*{r.role_Id})|" />
					</td>
				</tr>

		</table>
		<p style="text-align:center;">


		<form action="" method="post" name="f1">
			<!--显示分页信息-->
			<div class="row">
				<!--文字信息-->
				<div class="col-md-6">
					当前第 <input name="startPage" th:value="${pageInfo.pageNum }"  style="width: 20px"/>/[[${pageInfo.pages}]]页.一共 [[${pageInfo.total}]] 条记录
				</div>
				<!--点击分页-->
				<div class="col-md-6">
					<nav aria-label="Page navigation">
						<ul class="pagination">
							<li><a href="javascript:f1.startPage.value=1;f1.submit()">首页</a></li>
							<!--上一页-->
							<li>
								<a th:if="${pageInfo.hasPreviousPage}" href="javascript:f1.startPage.value=f1.startPage.value-1;f1.submit()" aria-label="Previous">
									<span aria-hidden="true">«</span>
								</a>
							</li>
							<!--循环遍历连续显示的页面，若是当前页就高亮显示，并且没有链接-->
							<li th:each="page_num:${pageInfo.navigatepageNums}"   th:class="${page_num == pageInfo.pageNum?'active':''}" >
								<a href="#" th:text="${page_num}" th:if="${page_num == pageInfo.pageNum}"> </a>
								<a th:if="${page_num != pageInfo.pageNum}" th:href="|javascript:f1.startPage.value=${page_num};f1.submit()|" th:text="${page_num}"></a>
							</li>
							<!--下一页-->
							<li>
								<a th:if="${pageInfo.hasNextPage}" href="javascript:f1.startPage.value=f1.startPage.value-0+1;f1.submit()"
								   aria-label="Next">
									<span aria-hidden="true">»</span>
								</a>
							</li>
							<li><a th:href="|javascript:f1.startPage.value=${pageInfo.pages};f1.submit()|">尾页</a></li>
						</ul>
					</nav>
				</div>
			</div>

		</form>

		</div>

		</p>
	</body>
	
</html>
